# Open Terminal and run the following command to install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install iTerm2 et al
brew install zsh, vim, python, git, gh, node, go, java, lua, curl
brew install wechat, qq, zoom, google-chrome, iterm2, sublime-text, texshop, skim, mark-text, obsidian, neteasymusic, chromedriver

# install omyzsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

# path configure in `myprofile``
MYWOKR_PATH="$HOME/Programming/Python/mywork"  # your own work path of python
SCRIPT_PATH="$HOME/Scripts"  # scripts crated by yourself

if [[ ":$PATH:" != *":$MYWORK_PATH:"* ]]; then
    echo "export PATH=\"\$PATH:$MYWORK_PATH\"" >> ~/myprofile
    source ~/myprofile
else
    echo "Path $MYWORK_PATH is already in your PATH."
fi

if [[ ":$PATH:" != *":$SCRIPT_PATH:"* ]]; then
    echo "export PATH=\"\$PATH:$SCRIPT_PATH\"" >> ~/myprofile
    source ~/myprofile
else
    echo "Path $SCRIPT_PATH is already in your PATH."
fi

cat >> ~/.zshrc <<EOF
# configuration from ~/myprofile
source ~/myprofile
EOF

source ~/.zshrc
# chsh -s $(which zsh)

# configure pip
cat >> ~/.pip <<EOF
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/

[install]
trusted-host = mirrors.aliyun.com
EOF